package org.projectwithoutname.ui.view;

import model.Serie;
import model.Workspace;
import model.impl.ModelFactoryImpl;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.projectwithoutname.commons.ICommandIds;
import org.projectwithoutname.ui.util.Hide;

public class SuperView extends ViewPart {
	
	public static final String ID = ICommandIds.SUPER_VIEW;
	private Hide manager = new Hide();
	
	private ResourceSet resourceSet = new ResourceSetImpl();
	ModelFactoryImpl factory = new ModelFactoryImpl();
	public Workspace root = factory.createWorkspace();
	private Serie serie = null;
	
	public Workspace getRoot(){
		return root ;
	}
	
	protected Resource getResource(String path){
		return resourceSet.getResource(URI.createPlatformResourceURI(path), true);
	}
	
	public Hide getHide(){
		return manager;
	}
	
	public void notify(Hide hide){
		manager = hide;
	}
	
	public void notify(Serie serie){
		this.serie = serie;
	}
	
	public Serie getSerie(){
		return serie;
	}
	
	public void notify(Workspace root){
		this.root = root;
	}
	@Override
	public void createPartControl(Composite parent) {
	}

	@Override
	public void setFocus() {
	}

}
